<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<ui:composition>
	<!--  The label attribute is optional. Generate it if it is missing. -->
	<c:if test="${empty label}">
	    <c:set var="label" value="${fieldName}" />
	</c:if>

	<!--  The sort attribute is optional. Set it to true if it is missing. -->
	<c:if test="${empty sort}">
	    <c:set var="sort" value="${true}" />
	</c:if>

        <h:column>
            <f:facet name="header">
                <h:panelGroup>
                    ${label} <br /> &nbsp;
                    <c:if test="${sort}">
                        <!-- <h:form id="#{fieldName}Column" prependId="false"> -->
                            [<h:commandLink styleClass="smallLink" action="#{backingBean.sort}">&#9650;<f:param name="by" value="${fieldName}"/>
                                <f:param name="order" value="asc"/>
                                <f:ajax execute="@this" render="@all" onevent="showIndicator" />
                            </h:commandLink><h:commandLink styleClass="smallLink" action="#{backingBean.sort}">&#9660;<f:param name="by" value="${fieldName}"/>
                                <f:param name="order" value="desc"/>
                                <f:ajax execute="@this" render="@all" onevent="showIndicator" />
                            </h:commandLink>]&nbsp;
                        <!-- </h:form> -->
                    </c:if>
                </h:panelGroup>
            </f:facet>

            <ui:insert />

        </h:column>
</ui:composition>

    <!--  Display the field name -->
    <!-- <c:when test="${fn:length(entity[fieldName]) > 0}"> -->
    <!-- <c:choose>
                <c:when test="${entity[fieldName]  == ''}">
                    <h:outputText value="${entity[fieldName]}"/>
                </c:when>
                <c:otherwise>
                    <h:outputText value="${msgs['user.generic.field-not-set']}" style="font-style: italic;" />
                </c:otherwise>
            </c:choose> -->
    
</html>
